package com.doyutu.seed.common.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author DoyuTu
 * @version 0.0.1
 * spring-boot-project-seed
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class BasicException extends RuntimeException {

    private static final long serialVersionUID = 728785602185872786L;
    private String code;
    private String message;

    public BasicException(String message) {
        super(message);
    }

    public BasicException(String message, Throwable cause) {
        super(message, cause);
    }

    public BasicException(Throwable cause) {
        super(cause);
    }

    public BasicException(String code, String message) {
        super();
        this.code = code;
        this.message = message;
    }
}
